<template>
  <div class="ele-body">
    <div class="ele-bg-white padding-15">
      <a-space size="middle" class="analysis-tabs-extra">
        <a-radio-group v-model:value="checked" @change="toggleChange">
          <a-radio-button value="1">首饰单据</a-radio-button>
          <a-radio-button value="2">饰品单据</a-radio-button>
          <a-radio-button value="3">旧货单据</a-radio-button>
          <a-radio-button value="4">赠品单据</a-radio-button>
        </a-radio-group>
      </a-space>
      <zbTable
        v-if="checked"
        ref="tableRef"
        type="code"
        :api-fun="get_list"
        :cate="checked"
      />
    </div>
  </div>
</template>

<script setup>
  import { ref, reactive, onMounted } from 'vue';
  import { Form, message } from 'ant-design-vue';
  import {
    PlusOutlined,
    UploadOutlined,
    ClearOutlined,
    RestOutlined
  } from '@ant-design/icons-vue';
  import zbTable from './components/danjushengchengIndex.vue';
  import { get_list } from '@/api/setting/receipts_check_rule';

  const checked = ref('1');
  const tableRef = ref(null);

  const toggleChange = (e) => {
    checked.value = e.target.value;
    tableRef.value.checkCate(checked.value);
  };
</script>

<style lang="less" scoped>
  .text_wrap {
    display: inline-block;
    min-width: 100px;
  }
</style>
